<template>
  <div>
    <InnerPageTable class="table" ref="valueSetTable" :config="pageTableConfig">
    </InnerPageTable>
  </div>
</template>

<script>
import { suggestPageColumn } from './columns'
import cover2Api from '@/api/cover2'
export default {
  name: 'suggest',
  data() {
    return {
      pageTableConfig: {
        loadDataFn: this.getSugList,
        columns: suggestPageColumn.bind(this)(),
        isPage: false
      }
    }
  },

  props: {
    processInstId: {
      type: String,
      default: ''
    }
  },
  methods: {
    getSugList(tableObj) {
      let { responseProcess, param } = tableObj
      // let paramsData = param
      return cover2Api.getProcessComment(this.processInstId).then(res => {
        let data = res.data || []
        data.sort(function(a,b) {
          return (a.createDate || 0) > (b.createDate || 0) ? -1 : 1
        })
        responseProcess({
          records: data,
        })
      })
    }
  },
  created() {
    this.$emit("SetTitle", "审批记录");
  },
  mounted() {
    this.$refs['valueSetTable'].load({
      // taskCode: this.taskCode,//:"编码",
      // logType: this.logType,
      // recordId: this.recordId
    })
  }
}
</script>

<style lang="scss" scoped>

</style>